Skip to content

feat(launcher): the pet in the header reacts to what you type - #71

Merged
JOhnsonKC201 merged 2 commits into
mainfrom
feat/launcher-pet-reacts
Oct 9, 2026
Merged

JOhnsonKC201 merged 2 commits into
mainfrom
feat/launcher-pet-reacts

Conversation

@JOhnsonKC201

Copy link
Copy Markdown
Owner

What this does

The pet in the corner of the launcher was a still picture. Now it reacts.

When The pet
The box is empty Breathes
You type and there is a row to run Leans toward the text, taps along with each key
You type and there is nothing to run yet Tilts its head
A search finally finds something, or you run a row Hops
The box is left empty for 8 seconds Dozes, with a small z

How

  • The sprite is not redrawn. cat-preview.js is shared with the site and tests/site-sync.test.js keeps the copies identical, so the finished picture is moved instead. Breathing animates scale, a mood is a rotate pose, a one-off is translate. They are separate CSS properties, so they compose, and all of it stays on the compositor.
  • src/launcher-pet.js is a pure function from (query, rows, idle time) to a mood. It sees whether a row can be run, never its wording, which keeps the launcher's rule that nothing is decided by reading a title.
  • It holds still under prefers-reduced-motion and under the app's own setting. The pose stays; every animation and transition goes.

Found in review, fixed before this was pushed

  • A long sentence followed by Escape dozed at once, because Escape empties the box without an input event.
  • One animation-duration on the doze rule outranked the hop and stretched it to six seconds. The breathing speed is now a variable.
  • The launcher re-renders once a second while a timer row counts down, and that cut a hop short. A reaction now ends with its own animation.
  • Reopening the launcher could show the last mood for a moment.

Limits

  • The eyes do not close for the doze and do not track the text. Both need the sprite itself to change, in src/ and site/ together. The lean stands in for eye tracking.
  • Pixel art rotated a few degrees is slightly jagged. Worth a look at real size before merging.

Test plan

  • npm test: 520 pass, 0 fail, 4 skipped (POSIX only)
  • npx eslint . clean
  • The real launcher page driven through twelve steps in a throwaway Electron window, reading the mood attribute, the running animations and the computed pose at each: matches the table. Run again with the app's hold-still setting: no animation at any step, poses kept.
  • Screenshots of the tilt and the doze
  • Watch it in the running app. The harness reads state; nobody has yet watched the motion at real speed.
  • Not run on macOS

It was a still picture in the corner of the box. It now breathes,
leans toward the text when there is a row to run, tilts its head
when there is not, taps along with each key, hops when a search
finally finds something or a row is run, and dozes with a small z
when the box is left empty for eight seconds.

The sprite is not redrawn. cat-preview.js is shared with the site
and a test keeps the two copies identical, so the finished picture
is moved instead: breathing animates scale, a mood is a rotate
pose, a one-off is translate. The three are separate properties,
so they never fight, and all of it stays on the compositor.

Which mood to show is a pure function in launcher-pet.js that
sees only whether a row can be run, never its wording.

It holds still under the OS reduced-motion setting and the app's
own: the pose stays, every animation and transition goes.

From review: Escape and running a row count as activity, so a long
sentence followed by Escape does not doze at once. The breathing
speed is a variable, since one animation-duration on the doze rule
outranked the hop and stretched it to six seconds. A reaction ends
with its own animation and not with the next re-render, which the
one-second timer countdown would otherwise cut short. Reopening
starts from rest.
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pixelcat Ready Ready Preview Oct 9, 2026 5:00am UTC

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

CI for 919ddf7: all jobs passed

Job Result Log
boot (macos-latest) passed open
boot (windows-latest) passed open
test passed open
packaged-boot (macos-latest) passed open
packaged-boot (windows-latest) passed open

Tests: 524 passed, 0 failed, 0 skipped, 524 total.

This comment updates itself on every push. Full run.

@JOhnsonKC201
JOhnsonKC201 merged commit e9e5c99 into main Oct 9, 2026
9 checks passed
@JOhnsonKC201
JOhnsonKC201 deleted the feat/launcher-pet-reacts branch October 9, 2026 05:10

This branch was successfully deployed

1 active deployment
Preview — 919ddf7b Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant